#ifndef T_MY_HTTPBACKEND_P_H
#define T_MY_HTTPBACKEND_P_H

#include "t_core.h"

class T_MyBackendFactory : public T_NetworkAccessBackendFactory
{
    Q_OBJECT
public:
    T_MyBackendFactory(QObject * parent = 0) : T_NetworkAccessBackendFactory(parent)
    {
    }
    virtual QObject *create(T_NetworkAccessManager * manager,
    //                        virtual QObject *create(QNetworkAccessManager * manager,
                            QNetworkAccessManager::Operation op,
                            const QNetworkRequest & request,
                            QIODevice * outgoingData) const;
};

class T_MyHttpAccessBackend : public T_HttpAccessBackend
{
    Q_OBJECT
public:
    explicit T_MyHttpAccessBackend(T_NetworkAccessManager * manager)
    //        explicit T_HttpAccessBackend(QNetworkAccessManager * manager)
        : T_HttpAccessBackend(manager)
    {  }
    virtual ~T_MyHttpAccessBackend()
    {  }
    virtual T_HttpAccessReply_Base *createHttpReply();
};

class T_NetworkAccessManager2 : public T_NetworkAccessManager
{
    Q_OBJECT
public:
    T_NetworkAccessManager2(QObject *parent = 0)
        : T_NetworkAccessManager(parent)
    {
        this->appendBackendFactory(new T_MyBackendFactory(this));
    }
};

#endif
